package com.add.util;

import cn.hutool.extra.mail.MailUtil;
import cn.hutool.log.StaticLog;


public class EmailUtil {

    //给指定email发送邮件
    public static void send(String email, String title, String content) {
        if(email.charAt(0)=='-') {
            StaticLog.warn("邮件未发送");
            return;
        }
        try {
            MailUtil.send(email, title, content+"\n请注意查看易班打卡情况", false);
            StaticLog.info("邮件发送成功");
        } catch (Exception e) {
            StaticLog.warn("邮箱异常");
        }
    }

}
